<!DOCTYPE html>
<html>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8">
    <title>Catalog (grid type view)</title>
</head>

<body onload="nav_a()">
{:widget('Cate/header')}
    <div class="breadcrumbs">
        <div class="container_12">
            <div class="grid_12">
                 <a href="index.html">Home</a><span></span><a href="#">Category</a><span></span><span class="current">This page</span>
            </div><!-- .grid_12 -->
        </div><!-- .container_12 -->
    </div><!-- .breadcrumbs -->
    
    <section id="main">
        <div class="container_12">
            <div id="content" class="grid_9">
				<div class="options">
                </div><!-- .options -->
                <div class="clear"></div>
                
                <div class="products catalog" id="pagesss">
                    {foreach $list_datas as $val}
                    <article class="grid_3 article">
                        <img class="sale" src="/static/home/img/sale.png" alt="Sale">
                        <div class="prev">
                            <a href="/lists/detail/id/{$val['id']}">
								<img src="{$val['goods_pic']}" alt="Product 1" title="">
							</a>
                        </div><!-- .prev -->
                        
                        <h3 class="title">{$val['goods_name']}</h3>
                        <div class="cart">
                            <div class="price">
                                <div class="vert">
                                    ${$val['goods_price']}
                                    <!--<div class="price_old">$725.00</div>-->
                                </div>
                            </div>
                            <!--<a href="#" class="obn"></a>-->
                            <a href="#" class="like"></a>
                            <a href="javascript:;" class="bay" id="cart" onclick="to_collections('/collections/add/id/{$val.id}')">
								<img src="/static/home/img/bg_timg.png" alt="Buy" title="添加收藏">
							</a>
                        </div><!-- .cart -->
                    </article><!-- .grid_3.article -->
                    {/foreach}
                    
                    <div class="clear"></div>
                </div><!-- .products -->
                <div class="clear"></div>
	      
                <div class="pagination">
		    <ul id="ll">
			<li>
			    <a id="prev" href="javascript:void(0)" onclick="firsts()">首页</a>
			</li>
			<li>
				<a id="prev" href="javascript:void(0)" onclick="prev()">上一页</a>
			</li>
				{foreach name="pp" item="vs"}
				<li ><a href="javascript:void(0)" rr="" onclick="pages({$vs})"id="a{$vs}">{$vs}</a></li>
				{/foreach}
			<li>
				<a href="javascript:void(0)" onclick="next()">下一页</a>
			</li>
			<li>
			    <a id="prev" href="javascript:void(0)" onclick="lasts()">尾页</a>
			</li>
		    </ul>
                </div><!-- .pagination -->
                <div class="clear"></div>
            </div><!-- #content -->
            
            <div id="sidebar" class="grid_3">
                <aside id="categories_nav">
		    <header class="aside_title">
                        <h3>Categories</h3>
                    </header>

		    <nav class="right_menu">
			<ul>
			    <li><a href="#">Home</a></li>
			    <li><a href="#">Wedding</a></li>
			    <li class="current"><a href="#">Rings</a></li>
			    <li><a href="#">Necklaces</a></li>
			    <li><a href="#">Earrings</a></li>
			    <li><a href="#">Bracelets</a></li>
			</ul>
		    </nav><!-- .right_menu -->
                </aside><!-- #categories_nav -->
                
                <aside id="shop_by">
                    <header class="aside_title">
                        <h3>Shop By</h3>
                    </header>
		     
		    <div class="currently_shopping">
			<h4>Currently Shopping by:</h4>
			<ul>
			    <li><a title="close" class="close" href="#"></a>Price: <span>$0.00 - $999.99</span></li>
			    <li><a title="close" class="close" href="#"></a>Manufacturer: <span>Apple</span></li>
			</ul>
			    
			<a class="clear_all" href="#">Clear All</a>
			    
			<div class="clear"></div>
		    </div><!-- .currently_shopping -->
		     
		    <h4 class="sub_title">Category</h4>
                    
                    <nav class="check_opt">
			<ul>
			    <li><a href="#">For Home (23)</a></li>
			    <li><a href="#">For Car (27)</a></li>
			    <li><a href="#">For Office (9)</a></li>
			</ul>
		    </nav><!-- .check_opt -->
		     
		    <h4 class="sub_title">Price</h4>

                    <nav class="check_opt price">
			<ul>
			    <li><a href="#">0.00 - $49.99 (21)</a></li>
			    <li><a href="#">$50.00 - $99.99 (7)</a></li>
			    <li><a href="#">$100.00 and above (15)</a></li>
			</ul>
		    </nav><!-- .check_opt -->
                </aside><!-- #shop_by -->

                <aside id="specials" class="specials">
                    <header class="aside_title">
                        <h3>Specials</h3>
                    </header>

		    <ul>
			<li>
			    <div class="prev">
				<a href="#"><img src="/static/home/img/content/product7.png" alt="Product 7" title=""></a>
			    </div>

			    <div class="cont">
				<a href="#">Emerald Cut Emerald Ring</a>
				<div class="prise"><span class="old">$1770.00</span> $750.00</div>
			    </div>
			</li>

			<li>
			    <div class="prev">
				<a href="#"><img src="/static/home/img/content/product1.png" alt="Product 1" title=""></a>
			    </div>

			    <div class="cont">
				<a href="#">Handmade Emerald Diamond Solitaire</a>
				<div class="prise">$3250.00</div>
			    </div>
			</li>
		     </ul>
                </aside><!-- #specials -->

                <aside id="compare_products">
                    <header class="aside_title">
                        <h3>Compare Products</h3>
                    </header>

		    <ul>
			<li><a title="close" class="close" href="#"></a>Home Collection Honeysuckle Orchid Flameless</li>
			<li><a title="close" class="close" href="#"></a>Caldrea Linen and Room Spray, Ginger Pomelo</li>
			<li><a title="close" class="close" href="#"></a>Fresh Wave Travel Size Spray</li>
		    </ul>

		    <button class="compare">Compare</button>
		    <a class="clear_all" href="#">Clear All</a>

		    <div class="clear"></div>
                </aside><!-- #compare_products -->

                <aside id="newsletter_signup">
                    <header class="aside_title">
                        <h3>Newsletter Signup</h3>
                    </header>

		    <p>Phasellus vel ultricies felis. Duis rhoncus risus eu urna pretium.</p>

		    <form class="newsletter">
			<input type="email" name="newsletter" class="your_email" value="" placeholder="Enter your email address...">
			<input type="submit" id="submit" value="Subscribe">
		    </form>
                </aside><!-- #newsletter_signup -->
                
            </div><!-- .sidebar -->
            <div class="clear"></div>
        </div><!-- .container_12 -->
    </section><!-- #main -->
    <div class="clear"></div>
<script src="/static/home/lib/layui/layui.js"></script>
<script>
	//分页
    function nav_a(){
        $("#a1").attr('rr','on')
    }

    layui.use(['layer'], function() {
        var layer = layui.layer;
    })
    function to_cart(url){
        $.get(url,{},function (data) {
            if(data.status==0){
                layer.msg(data.msg,{icon:1,time:1000})
			}else{
                layer.msg(data.msg,{icon:2,time:1000})
			}
        },'json')
    }
    function pages(page){
        $.get('/lists/page',{page:page,id:{$id}},function(data){
            $("#ll").find("li a[rr='on']").attr('rr','')
            $("#ll").find("#a"+page).attr('rr','on')
          $('#pagesss').html(data)
		})
	}
	//上一页
	function prev()
	{
        page=$("#ll").find("li a[rr='on']").html();
        if(page>1){
            $("#ll").find("li a[rr='on']").attr('rr','');
            page=parseInt(page)-1;
            $.get('/lists/page',{page:page,id:{$id}},function(data){
                $("#ll").find("#a"+page).attr('rr','on');
                $('#pagesss').html(data);
            });
        }
	}

	//下一页
    function next()
    {
        page=$("#ll").find("li a[rr='on']").html();
        if(page<{$maxpage}){
            $("#ll").find("li a[rr='on']").attr('rr','');
            page=parseInt(page)+1;
            $.get('/lists/page',{page:page,id:{$id}},function(data){
				$("#ll").find("#a"+page).attr('rr','on');
                $('#pagesss').html(data);
            });
        }
    }

    //首页
	function firsts()
	{
        page=$("#ll").find("li a[rr='on']").html();
		$("#ll").find("li a[rr='on']").attr('rr','');
		page=1;
		$.get('/lists/page',{page:page,id:{$id}},function(data){
		$("#ll").find("#a"+page).attr('rr','on');
        $('#pagesss').html(data);
		});
	}

	//尾页
	function lasts()
	{
        page=$("#ll").find("li a[rr='on']").html();
		$("#ll").find("li a[rr='on']").attr('rr','');
		page={$maxpage};
		$.get('/lists/page',{page:page,id:{$id}},function(data){
		$("#ll").find("#a"+page).attr('rr','on');
        $('#pagesss').html(data);
		});
	}

	//收藏
	function to_collections(url)
    {
        $.get(url,{},function (data) {
            if(data.status==0){
                layer.msg(data.msg,{icon:1,time:1000})
            }else{
                layer.msg(data.msg,{icon:2,time:1000})
            }
        },'json')
    }
</script>



{:widget('Cate/footer')}
</body>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
</html>
